import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex)
let listData = JSON.parse(localStorage.getItem('listData')||'[]');
const store = new Vuex.Store({
  state: {
    listData: listData
  },
  mutations: {
    setListData(state,data){
      state.listData = data;
      localStorage.setItem('listData',JSON.stringify(state.listData));
    }
  }
});
export default store;